import request from '@/utils/request'
import  type {SearchClazzModel, ClazzModel, ClazzModelArray,ResultModel} from '@/api/model/model'

// 查询班级列表
export const  queryclazzList =  (name:string,begin:string,end:string,page:number,pageSize:number)=>request.get(`/clazzs?name=${name}&begin=${begin}&end=${end}&page=${page}&pageSize=${pageSize}`);

//查询全部班级信息
export const queryAllApi = () => request.get<any, ResultModel>('/clazzs/list') 

//新增班级
export const addClazz = (clazz:ClazzModel) =>request.post<any, ResultModel>("/clazzs", clazz);

//查询班主任信息
export const queryAllEmpApi = ()=>request.get(`/emps/list`);

//更新班级回显
export const getClazzById = (id:string)=>request.get(`/clazzs/${id}`);

//更新班级
export const updateClazz = (clazz:ClazzModel)=>request.put<any, ResultModel>("/clazzs", clazz);

// 删除班级
export const deleteClazzByIds = (id:string)=>request.delete<number, ResultModel>(`/clazzs/${id}`);